<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>服务列表 - 社交服务平台</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome 图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <style>
        :root {
            --primary: #3b82f6;
            --primary-light: #60a5fa;
            --primary-dark: #2563eb;
            --secondary: #8b5cf6;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --text-primary: #111827;
            --text-secondary: #6b7280;
            --text-light: #9ca3af;
            --bg-light: #f9fafb;
            --bg-white: #ffffff;
            --border-light: #e5e7eb;
            --border-medium: #d1d5db;
            --radius: 8px;
            --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--bg-light);
            color: var(--text-primary);
            padding-top: 55px;
            padding-bottom: 70px;
        }
        
        /* 顶部导航 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 55px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 15px;
            z-index: 1000;
            border-bottom: 1px solid var(--border-light);
        }
        
        .nav-title {
            font-size: 1.1rem;
            font-weight: 600;
        }
        
        .nav-actions {
            display: flex;
            gap: 15px;
            font-size: 1.2rem;
        }
        
        /* 搜索栏 */
        .search-bar {
            padding: 10px 15px;
            background-color: var(--bg-light);
        }
        
        .search-input-group {
            position: relative;
        }
        
        .search-input {
            width: 100%;
            padding: 10px 15px 10px 40px;
            border-radius: 20px;
            border: 1px solid var(--border-light);
            background-color: var(--bg-white);
            font-size: 0.9rem;
        }
        
        .search-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
        }
        
        .search-icon {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-light);
        }
        
        /* 筛选栏 */
        .filter-bar {
            display: flex;
            background-color: var(--bg-white);
            border-bottom: 1px solid var(--border-light);
            overflow-x: auto;
        }
        
        .filter-item {
            flex: 0 0 auto;
            padding: 12px 15px;
            font-size: 0.9rem;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 5px;
            border-bottom: 2px solid transparent;
        }
        
        .filter-item.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }
        
        .filter-item i {
            font-size: 0.8rem;
        }
        
        /* 筛选弹窗 */
        .filter-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 2000;
            display: none;
        }
        
        .filter-modal.show {
            display: block;
        }
        
        .filter-content {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: var(--bg-white);
            border-top-left-radius: var(--radius);
            border-top-right-radius: var(--radius);
            max-height: 85vh;
            overflow-y: auto;
            transform: translateY(100%);
            transition: transform 0.3s ease;
        }
        
        .filter-modal.show .filter-content {
            transform: translateY(0);
        }
        
        .filter-header {
            padding: 15px;
            border-bottom: 1px solid var(--border-light);
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            background-color: var(--bg-white);
        }
        
        .filter-title {
            font-size: 1.1rem;
            font-weight: 600;
        }
        
        .filter-actions {
            display: flex;
            gap: 10px;
        }
        
        .filter-btn {
            padding: 6px 15px;
            border-radius: 4px;
            font-size: 0.9rem;
            font-weight: 500;
        }
        
        .filter-btn.reset {
            background-color: var(--bg-light);
            border: none;
            color: var(--text-secondary);
        }
        
        .filter-btn.confirm {
            background-color: var(--primary);
            border: none;
            color: white;
        }
        
        .filter-body {
            padding: 15px;
        }
        
        .filter-section {
            margin-bottom: 20px;
        }
        
        .filter-section-title {
            font-weight: 600;
            margin-bottom: 12px;
            font-size: 1rem;
        }
        
        /* 分类筛选 */
        .category-filter {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }
        
        .category-option {
            padding: 8px 15px;
            border-radius: 20px;
            background-color: var(--bg-light);
            color: var(--text-secondary);
            font-size: 0.9rem;
            border: 1px solid transparent;
        }
        
        .category-option.selected {
            background-color: rgba(59, 130, 246, 0.1);
            color: var(--primary);
            border-color: var(--primary);
        }
        
        /* 价格筛选 */
        .price-filter {
            padding: 10px 0;
        }
        
        .price-inputs {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
        }
        
        .price-input-group {
            flex: 1;
            position: relative;
        }
        
        .price-input {
            width: 100%;
            padding: 10px 15px 10px 30px;
            border-radius: 6px;
            border: 1px solid var(--border-light);
            font-size: 0.9rem;
        }
        
        .price-symbol {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-light);
        }
        
        .price-range {
            width: 100%;
            height: 6px;
            -webkit-appearance: none;
            appearance: none;
            background-color: var(--border-light);
            border-radius: 3px;
            outline: none;
            margin: 20px 0;
        }
        
        .price-range::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background-color: var(--primary);
            cursor: pointer;
        }
        
        .price-range-labels {
            display: flex;
            justify-content: space-between;
            font-size: 0.8rem;
            color: var(--text-light);
        }
        
        /* 评分筛选 */
        .rating-filter {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .rating-option {
            display: flex;
            align-items: center;
            padding: 10px;
            border-radius: 6px;
            border: 1px solid var(--border-light);
        }
        
        .rating-stars {
            color: var(--warning);
            margin-right: 10px;
            font-size: 1rem;
        }
        
        .rating-label {
            flex: 1;
            font-size: 0.9rem;
        }
        
        .rating-count {
            color: var(--text-light);
            font-size: 0.8rem;
        }
        
        .rating-option.selected {
            border-color: var(--primary);
            background-color: rgba(59, 130, 246, 0.05);
        }
        
        .rating-option.selected .rating-check {
            color: var(--primary);
        }
        
        /* 更多筛选选项 */
        .more-filter {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        
        .filter-checkbox {
            display: none;
        }
        
        .filter-checkbox + label {
            display: flex;
            align-items: center;
            padding: 10px;
            border-radius: 6px;
            border: 1px solid var(--border-light);
            font-size: 0.9rem;
            cursor: pointer;
        }
        
        .filter-checkbox + label::before {
            content: "\f0c8";
            font-family: "Font Awesome 6 Free";
            font-weight: 400;
            margin-right: 10px;
            color: var(--text-light);
        }
        
        .filter-checkbox:checked + label::before {
            content: "\f14a";
            font-weight: 900;
            color: var(--primary);
        }
        
        .filter-checkbox:checked + label {
            border-color: var(--primary);
            background-color: rgba(59, 130, 246, 0.05);
        }
        
        /* 已选筛选条件 */
        .active-filters {
            padding: 10px 15px;
            background-color: var(--bg-white);
            border-bottom: 1px solid var(--border-light);
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
        }
        
        .active-filter-tag {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            background-color: rgba(59, 130, 246, 0.1);
            color: var(--primary);
            border-radius: 15px;
            font-size: 0.85rem;
        }
        
        .active-filter-remove {
            cursor: pointer;
            font-size: 0.9rem;
        }
        
        .clear-all {
            color: var(--text-secondary);
            font-size: 0.85rem;
            margin-left: auto;
            cursor: pointer;
        }
        
        /* 服务列表 */
        .service-list {
            padding: 10px 15px;
        }
        
        .service-item {
            background-color: var(--bg-white);
            border-radius: var(--radius);
            padding: 15px;
            margin-bottom: 12px;
            box-shadow: var(--shadow);
        }
        
        .service-header {
            display: flex;
            margin-bottom: 10px;
        }
        
        .service-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            overflow: hidden;
            margin-right: 10px;
        }
        
        .service-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .service-provider {
            flex: 1;
        }
        
        .provider-name {
            font-weight: 500;
            margin-bottom: 2px;
        }
        
        .service-meta {
            display: flex;
            font-size: 0.8rem;
            color: var(--text-light);
            gap: 8px;
        }
        
        .service-content {
            margin-bottom: 10px;
        }
        
        .service-title {
            font-weight: 600;
            margin-bottom: 5px;
            line-height: 1.4;
        }
        
        .service-description {
            color: var(--text-secondary);
            font-size: 0.9rem;
            line-height: 1.5;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        /* 图片容器 */
        .service-images {
            margin: 10px 0;
            display: none;
        }
        
        .service-images.has-images {
            display: block;
        }
        
        .image-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 5px;
        }
        
        .service-image {
            aspect-ratio: 1/1;
            border-radius: 6px;
            overflow: hidden;
            position: relative;
        }
        
        .service-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .image-count {
            position: absolute;
            bottom: 5px;
            right: 5px;
            background-color: rgba(0, 0, 0, 0.6);
            color: white;
            font-size: 0.7rem;
            padding: 2px 6px;
            border-radius: 10px;
        }
        
        /* 服务标签和价格 */
        .service-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 10px;
        }
        
        .service-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        
        .service-tag {
            font-size: 0.8rem;
            padding: 2px 8px;
            border-radius: 4px;
            background-color: rgba(59, 130, 246, 0.1);
            color: var(--primary);
        }
        
        .service-price {
            font-weight: 600;
            color: var(--danger);
        }
        
        /* 服务操作栏 */
        .service-actions {
            display: flex;
            justify-content: space-between;
            padding: 8px 0 0;
            border-top: 1px solid var(--border-light);
            margin-top: 10px;
        }
        
        .action-button {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.85rem;
            color: var(--text-secondary);
            background: none;
            border: none;
        }
        
        .action-button.primary {
            color: var(--primary);
        }
        
        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 60px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid var(--border-light);
            z-index: 1000;
        }
        
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: var(--text-secondary);
            font-size: 0.7rem;
        }
        
        .nav-item i {
            font-size: 1.2rem;
            margin-bottom: 3px;
        }
        
        .nav-item.active {
            color: var(--primary);
        }
        
        /* 筛选结果提示 */
        .filter-result {
            padding: 10px 15px;
            background-color: rgba(59, 130, 246, 0.05);
            color: var(--primary);
            font-size: 0.85rem;
            display: none;
        }
        
        .filter-result.show {
            display: block;
        }
        
        /* 空状态 */
        .empty-state {
            padding: 40px 20px;
            text-align: center;
            display: none;
        }
        
        .empty-state.show {
            display: block;
        }
        
        .empty-icon {
            font-size: 3rem;
            color: var(--text-light);
            margin-bottom: 15px;
        }
        
        .empty-text {
            color: var(--text-light);
            margin-bottom: 20px;
        }
        
        .empty-button {
            padding: 8px 20px;
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 20px;
            font-size: 0.9rem;
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <div class="top-nav">
        <div class="nav-left">
            <i class="fas fa-arrow-left"></i>
        </div>
        <div class="nav-title">服务列表</div>
        <div class="nav-actions">
            <i class="far fa-bell"></i>
            <i class="far fa-user"></i>
        </div>
    </div>
    
    <!-- 搜索栏 -->
    <div class="search-bar">
        <div class="search-input-group">
            <i class="fas fa-search search-icon"></i>
            <input type="text" class="search-input" placeholder="搜索服务或服务提供者...">
        </div>
    </div>
    
    <!-- 筛选栏 -->
    <div class="filter-bar">
        <div class="filter-item active" data-filter="category">
            <span>分类</span>
            <i class="fas fa-chevron-down"></i>
        </div>
        <div class="filter-item" data-filter="price">
            <span>价格</span>
            <i class="fas fa-chevron-down"></i>
        </div>
        <div class="filter-item" data-filter="rating">
            <span>评分</span>
            <i class="fas fa-chevron-down"></i>
        </div>
        <div class="filter-item" data-filter="more">
            <span>更多</span>
            <i class="fas fa-chevron-down"></i>
        </div>
        <div class="filter-item" data-filter="sort">
            <span>排序</span>
            <i class="fas fa-chevron-down"></i>
        </div>
    </div>
    
    <!-- 已选筛选条件 -->
    <div class="active-filters">
        <!-- 动态生成的筛选标签 -->
        <div class="active-filter-tag">
            <span>设计创意</span>
            <i class="fas fa-times active-filter-remove"></i>
        </div>
        <div class="active-filter-tag">
            <span>¥100-¥500</span>
            <i class="fas fa-times active-filter-remove"></i>
        </div>
        <div class="active-filter-tag">
            <span>4星以上</span>
            <i class="fas fa-times active-filter-remove"></i>
        </div>
        <div class="clear-all">清除全部</div>
    </div>
    
    <!-- 筛选结果提示 -->
    <div class="filter-result show">
        已为您找到 12 个符合条件的服务
    </div>
    
    <!-- 服务列表 -->
    <div class="service-list">
        <!-- 服务项1 -->
        <div class="service-item">
            <div class="service-header">
                <div class="service-avatar">
                    <img src="https://picsum.photos/id/64/100/100" alt="服务提供者头像">
                </div>
                <div class="service-provider">
                    <div class="provider-name">创意设计工作室</div>
                    <div class="service-meta">
                        <span><i class="fas fa-map-marker-alt"></i> 北京市</span>
                        <span><i class="fas fa-star"></i> 4.9</span>
                    </div>
                </div>
            </div>
            
            <div class="service-content">
                <div class="service-title">品牌LOGO设计 原创标志设计 含商标注册咨询</div>
                <div class="service-description">
                    专业设计师团队提供品牌LOGO设计服务，原创作品，包含3套方案供选择，修改到满意为止，赠送商标注册咨询。
                </div>
            </div>
            
            <div class="service-images has-images">
                <div class="image-grid" data-service-id="1">
                    <div class="service-image">
                        <img src="https://picsum.photos/id/26/300/300" alt="服务图片1">
                    </div>
                    <div class="service-image">
                        <img src="https://picsum.photos/id/28/300/300" alt="服务图片2">
                    </div>
                    <div class="service-image">
                        <img src="https://picsum.photos/id/29/300/300" alt="服务图片3">
                    </div>
                </div>
            </div>
            
            <div class="service-footer">
                <div class="service-tags">
                    <div class="service-tag">LOGO设计</div>
                    <div class="service-tag">品牌设计</div>
                    <div class="service-tag">原创</div>
                </div>
                <div class="service-price">¥399起</div>
            </div>
            
            <div class="service-actions">
                <button class="action-button">
                    <i class="far fa-comment"></i>
                    <span>咨询</span>
                </button>
                <button class="action-button">
                    <i class="far fa-heart"></i>
                    <span>收藏</span>
                </button>
                <button class="action-button primary">
                    <i class="fas fa-shopping-cart"></i>
                    <span>购买</span>
                </button>
            </div>
        </div>
        
        <!-- 服务项2 -->
        <div class="service-item">
            <div class="service-header">
                <div class="service-avatar">
                    <img src="https://picsum.photos/id/65/100/100" alt="服务提供者头像">
                </div>
                <div class="service-provider">
                    <div class="provider-name">UI设计工坊</div>
                    <div class="service-meta">
                        <span><i class="fas fa-map-marker-alt"></i> 上海市</span>
                        <span><i class="fas fa-star"></i> 4.8</span>
                    </div>
                </div>
            </div>
            
            <div class="service-content">
                <div class="service-title">移动应用UI设计 小程序界面设计 原型+视觉</div>
                <div class="service-description">
                    专业UI设计师提供移动应用和小程序界面设计服务，包含用户体验设计、交互原型和视觉设计，提供源文件。
                </div>
            </div>
            
            <div class="service-images has-images">
                <div class="image-grid" data-service-id="2">
                    <div class="service-image">
                        <img src="https://picsum.photos/id/0/300/300" alt="服务图片1">
                    </div>
                    <div class="service-image">
                        <img src="https://picsum.photos/id/1/300/300" alt="服务图片2">
                    </div>
                </div>
            </div>
            
            <div class="service-footer">
                <div class="service-tags">
                    <div class="service-tag">UI设计</div>
                    <div class="service-tag">小程序</div>
                    <div class="service-tag">原型设计</div>
                </div>
                <div class="service-price">¥499起</div>
            </div>
            
            <div class="service-actions">
                <button class="action-button">
                    <i class="far fa-comment"></i>
                    <span>咨询</span>
                </button>
                <button class="action-button">
                    <i class="far fa-heart"></i>
                    <span>收藏</span>
                </button>
                <button class="action-button primary">
                    <i class="fas fa-shopping-cart"></i>
                    <span>购买</span>
                </button>
            </div>
        </div>
        
        <!-- 服务项3 -->
        <div class="service-item">
            <div class="service-header">
                <div class="service-avatar">
                    <img src="https://picsum.photos/id/66/100/100" alt="服务提供者头像">
                </div>
                <div class="service-provider">
                    <div class="provider-name">平面设计工作室</div>
                    <div class="service-meta">
                        <span><i class="fas fa-map-marker-alt"></i> 广州市</span>
                        <span><i class="fas fa-star"></i> 4.7</span>
                    </div>
                </div>
            </div>
            
            <div class="service-content">
                <div class="service-title">海报设计 宣传单页 社交媒体配图设计</div>
                <div class="service-description">
                    提供各类平面设计服务，包括海报、宣传单页、社交媒体配图等，快速出稿，支持修改，提供多种格式文件。
                </div>
            </div>
            
            <div class="service-images has-images">
                <div class="image-grid" data-service-id="3">
                    <div class="service-image">
                        <img src="https://picsum.photos/id/20/300/300" alt="服务图片1">
                    </div>
                </div>
            </div>
            
            <div class="service-footer">
                <div class="service-tags">
                    <div class="service-tag">海报设计</div>
                    <div class="service-tag">平面设计</div>
                    <div class="service-tag">快速出稿</div>
                </div>
                <div class="service-price">¥159起</div>
            </div>
            
            <div class="service-actions">
                <button class="action-button">
                    <i class="far fa-comment"></i>
                    <span>咨询</span>
                </button>
                <button class="action-button">
                    <i class="far fa-heart"></i>
                    <span>收藏</span>
                </button>
                <button class="action-button primary">
                    <i class="fas fa-shopping-cart"></i>
                    <span>购买</span>
                </button>
            </div>
        </div>
    </div>
    
    <!-- 空状态 -->
    <div class="empty-state">
        <div class="empty-icon">
            <i class="far fa-folder-open"></i>
        </div>
        <div class="empty-text">没有找到符合条件的服务</div>
        <button class="empty-button">清除筛选条件</button>
    </div>
    
    <!-- 底部导航 -->
    <div class="bottom-nav">
        <div class="nav-item">
            <i class="fas fa-home"></i>
            <span>首页</span>
        </div>
        <div class="nav-item active">
            <i class="fas fa-concierge-bell"></i>
            <span>服务</span>
        </div>
        <div class="nav-item">
            <i class="fas fa-plus-circle"></i>
            <span>发布</span>
        </div>
        <div class="nav-item">
            <i class="far fa-comment"></i>
            <span>消息</span>
        </div>
        <div class="nav-item">
            <i class="far fa-user"></i>
            <span>我的</span>
        </div>
    </div>
    
    <!-- 分类筛选弹窗 -->
    <div class="filter-modal" id="categoryFilter">
        <div class="filter-content">
            <div class="filter-header">
                <div class="filter-title">服务分类</div>
                <div class="filter-actions">
                    <button class="filter-btn reset">重置</button>
                    <button class="filter-btn confirm">确认</button>
                </div>
            </div>
            <div class="filter-body">
                <div class="filter-section">
                    <div class="category-filter">
                        <div class="category-option selected">全部服务</div>
                        <div class="category-option">设计创意</div>
                        <div class="category-option">教育培训</div>
                        <div class="category-option">生活服务</div>
                        <div class="category-option">技术开发</div>
                        <div class="category-option">营销推广</div>
                        <div class="category-option">咨询服务</div>
                        <div class="category-option">摄影摄像</div>
                        <div class="category-option">文案写作</div>
                        <div class="category-option">翻译服务</div>
                        <div class="category-option">音频视频</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 价格筛选弹窗 -->
    <div class="filter-modal" id="priceFilter">
        <div class="filter-content">
            <div class="filter-header">
                <div class="filter-title">价格范围</div>
                <div class="filter-actions">
                    <button class="filter-btn reset">重置</button>
                    <button class="filter-btn confirm">确认</button>
                </div>
            </div>
            <div class="filter-body">
                <div class="filter-section">
                    <div class="price-filter">
                        <div class="price-inputs">
                            <div class="price-input-group">
                                <span class="price-symbol">¥</span>
                                <input type="number" class="price-input" placeholder="最低" value="100">
                            </div>
                            <div class="price-input-group">
                                <span class="price-symbol">¥</span>
                                <input type="number" class="price-input" placeholder="最高" value="500">
                            </div>
                        </div>
                        
                        <input type="range" class="price-range" min="0" max="1000" value="500">
                        
                        <div class="price-range-labels">
                            <span>¥0</span>
                            <span>¥500</span>
                            <span>¥1000+</span>
                        </div>
                        
                        <div class="category-filter" style="margin-top: 20px;">
                            <div class="category-option">¥0-¥100</div>
                            <div class="category-option selected">¥100-¥500</div>
                            <div class="category-option">¥500-¥1000</div>
                            <div class="category-option">¥1000以上</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 评分筛选弹窗 -->
    <div class="filter-modal" id="ratingFilter">
        <div class="filter-content">
            <div class="filter-header">
                <div class="filter-title">服务评分</div>
                <div class="filter-actions">
                    <button class="filter-btn reset">重置</button>
                    <button class="filter-btn confirm">确认</button>
                </div>
            </div>
            <div class="filter-body">
                <div class="filter-section">
                    <div class="rating-filter">
                        <div class="rating-option">
                            <div class="rating-stars">
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                            </div>
                            <div class="rating-label">5星</div>
                            <div class="rating-count">12个服务</div>
                            <i class="fas fa-check rating-check" style="color: transparent;"></i>
                        </div>
                        <div class="rating-option selected">
                            <div class="rating-stars">
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="far fa-star"></i>
                            </div>
                            <div class="rating-label">4星及以上</div>
                            <div class="rating-count">38个服务</div>
                            <i class="fas fa-check rating-check"></i>
                        </div>
                        <div class="rating-option">
                            <div class="rating-stars">
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="far fa-star"></i>
                                <i class="far fa-star"></i>
                            </div>
                            <div class="rating-label">3星及以上</div>
                            <div class="rating-count">56个服务</div>
                            <i class="fas fa-check rating-check" style="color: transparent;"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 更多筛选弹窗 -->
    <div class="filter-modal" id="moreFilter">
        <div class="filter-content">
            <div class="filter-header">
                <div class="filter-title">更多筛选</div>
                <div class="filter-actions">
                    <button class="filter-btn reset">重置</button>
                    <button class="filter-btn confirm">确认</button>
                </div>
            </div>
            <div class="filter-body">
                <div class="filter-section">
                    <div class="filter-section-title">服务属性</div>
                    <div class="more-filter">
                        <input type="checkbox" id="filter1" class="filter-checkbox" checked>
                        <label for="filter1">可在线服务</label>
                        
                        <input type="checkbox" id="filter2" class="filter-checkbox">
                        <label for="filter2">可上门服务</label>
                        
                        <input type="checkbox" id="filter3" class="filter-checkbox" checked>
                        <label for="filter3">支持担保交易</label>
                        
                        <input type="checkbox" id="filter4" class="filter-checkbox">
                        <label for="filter4">提供发票</label>
                    </div>
                </div>
                
                <div class="filter-section">
                    <div class="filter-section-title">服务地区</div>
                    <div class="category-filter">
                        <div class="category-option selected">全国</div>
                        <div class="category-option">北京市</div>
                        <div class="category-option">上海市</div>
                        <div class="category-option">广州市</div>
                        <div class="category-option">深圳市</div>
                        <div class="category-option">杭州市</div>
                        <div class="category-option">成都市</div>
                    </div>
                </div>
                
                <div class="filter-section">
                    <div class="filter-section-title">服务销量</div>
                    <div class="more-filter">
                        <input type="checkbox" id="filter5" class="filter-checkbox">
                        <label for="filter5">月销100+</label>
                        
                        <input type="checkbox" id="filter6" class="filter-checkbox" checked>
                        <label for="filter6">月销50+</label>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 排序筛选弹窗 -->
    <div class="filter-modal" id="sortFilter">
        <div class="filter-content">
            <div class="filter-header">
                <div class="filter-title">排序方式</div>
                <div class="filter-actions">
                    <button class="filter-btn confirm">确认</button>
                </div>
            </div>
            <div class="filter-body">
                <div class="filter-section">
                    <div class="more-filter">
                        <input type="radio" name="sort" id="sort1" class="filter-checkbox" checked>
                        <label for="sort1">推荐排序</label>
                        
                        <input type="radio" name="sort" id="sort2" class="filter-checkbox">
                        <label for="sort2">价格从低到高</label>
                        
                        <input type="radio" name="sort" id="sort3" class="filter-checkbox">
                        <label for="sort3">价格从高到低</label>
                        
                        <input type="radio" name="sort" id="sort4" class="filter-checkbox">
                        <label for="sort4">评分从高到低</label>
                        
                        <input type="radio" name="sort" id="sort5" class="filter-checkbox">
                        <label for="sort5">最新发布</label>
                        
                        <input type="radio" name="sort" id="sort6" class="filter-checkbox">
                        <label for="sort6">销量从高到低</label>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // 筛选弹窗控制
        const filterItems = document.querySelectorAll('.filter-item');
        const filterModals = {
            category: document.getElementById('categoryFilter'),
            price: document.getElementById('priceFilter'),
            rating: document.getElementById('ratingFilter'),
            more: document.getElementById('moreFilter'),
            sort: document.getElementById('sortFilter')
        };
        
        // 打开筛选弹窗
        filterItems.forEach(item => {
            item.addEventListener('click', () => {
                // 移除所有筛选项的活跃状态
                filterItems.forEach(i => i.classList.remove('active'));
                // 添加当前筛选项的活跃状态
                item.classList.add('active');
                
                const filterType = item.getAttribute('data-filter');
                
                // 关闭所有弹窗
                Object.values(filterModals).forEach(modal => {
                    modal.classList.remove('show');
                });
                
                // 打开对应的弹窗
                if (filterModals[filterType]) {
                    filterModals[filterType].classList.add('show');
                    document.body.style.overflow = 'hidden';
                }
            });
        });
        
        // 关闭筛选弹窗
        function closeAllFilters() {
            Object.values(filterModals).forEach(modal => {
                modal.classList.remove('show');
            });
            filterItems.forEach(item => item.classList.remove('active'));
            document.body.style.overflow = '';
        }
        
        // 点击弹窗外部关闭
        Object.values(filterModals).forEach(modal => {
            modal.addEventListener('click', (e) => {
                if (e.target === modal) {
                    closeAllFilters();
                }
            });
        });
        
        // 分类筛选选项点击
        const categoryOptions = document.querySelectorAll('.category-option');
        categoryOptions.forEach(option => {
            option.addEventListener('click', () => {
                // 如果是单选组（不是价格快速筛选）
                if (!option.parentElement.classList.contains('price-filter')) {
                    const parent = option.parentElement;
                    parent.querySelectorAll('.category-option').forEach(opt => {
                        opt.classList.remove('selected');
                    });
                }
                option.classList.toggle('selected');
            });
        });
        
        // 评分筛选选项点击
        const ratingOptions = document.querySelectorAll('.rating-option');
        ratingOptions.forEach(option => {
            option.addEventListener('click', () => {
                ratingOptions.forEach(opt => {
                    opt.classList.remove('selected');
                    opt.querySelector('.rating-check').style.color = 'transparent';
                });
                option.classList.add('selected');
                option.querySelector('.rating-check').style.color = 'var(--primary)';
            });
        });
        
        // 确认筛选按钮点击
        const confirmButtons = document.querySelectorAll('.filter-btn.confirm');
        confirmButtons.forEach(button => {
            button.addEventListener('click', () => {
                // 获取当前弹窗类型
                const modal = button.closest('.filter-modal');
                const filterType = Object.keys(filterModals).find(key => filterModals[key] === modal);
                
                // 在实际应用中，这里会收集筛选条件并发送请求
                
                // 关闭所有弹窗
                closeAllFilters();
                
                // 更新筛选结果计数（模拟）
                updateFilterResults();
            });
        });
        
        // 重置筛选按钮点击
        const resetButtons = document.querySelectorAll('.filter-btn.reset');
        resetButtons.forEach(button => {
            button.addEventListener('click', () => {
                const modal = button.closest('.filter-modal');
                
                // 重置当前弹窗的筛选条件
                if (modal.id === 'categoryFilter') {
                    modal.querySelectorAll('.category-option').forEach(option => {
                        option.classList.remove('selected');
                    });
                    modal.querySelector('.category-option:first-child').classList.add('selected');
                } else if (modal.id === 'priceFilter') {
                    modal.querySelectorAll('.price-input').forEach(input => {
                        input.value = '';
                    });
                    modal.querySelector('.price-range').value = 500;
                    modal.querySelectorAll('.category-option').forEach(option => {
                        option.classList.remove('selected');
                    });
                } else if (modal.id === 'ratingFilter') {
                    modal.querySelectorAll('.rating-option').forEach(option => {
                        option.classList.remove('selected');
                        option.querySelector('.rating-check').style.color = 'transparent';
                    });
                } else if (modal.id === 'moreFilter') {
                    modal.querySelectorAll('.filter-checkbox').forEach(checkbox => {
                        checkbox.checked = false;
                    });
                    modal.querySelectorAll('.category-option').forEach(option => {
                        option.classList.remove('selected');
                    });
                    modal.querySelector('.category-option:first-child').classList.add('selected');
                }
            });
        });
        
        // 移除单个筛选条件
        const filterRemoveButtons = document.querySelectorAll('.active-filter-remove');
        filterRemoveButtons.forEach(button => {
            button.addEventListener('click', () => {
                const tag = button.closest('.active-filter-tag');
                tag.remove();
                
                // 如果没有筛选条件了，隐藏清除全部按钮和结果提示
                if (document.querySelectorAll('.active-filter-tag').length === 0) {
                    document.querySelector('.clear-all').style.display = 'none';
                    document.querySelector('.filter-result').classList.remove('show');
                }
                
                // 更新筛选结果
                updateFilterResults();
            });
        });
        
        // 清除全部筛选条件
        document.querySelector('.clear-all').addEventListener('click', () => {
            document.querySelectorAll('.active-filter-tag').forEach(tag => {
                tag.remove();
            });
            document.querySelector('.clear-all').style.display = 'none';
            document.querySelector('.filter-result').classList.remove('show');
            
            // 重置所有筛选弹窗的选中状态
            resetAllFilters();
            
            // 更新筛选结果
            updateFilterResults();
        });
        
        // 重置所有筛选条件
        function resetAllFilters() {
            // 重置分类筛选
            document.querySelectorAll('#categoryFilter .category-option').forEach(option => {
                option.classList.remove('selected');
            });
            document.querySelector('#categoryFilter .category-option:first-child').classList.add('selected');
            
            // 重置价格筛选
            document.querySelectorAll('#priceFilter .price-input').forEach(input => {
                input.value = '';
            });
            document.querySelector('#priceFilter .price-range').value = 500;
            document.querySelectorAll('#priceFilter .category-option').forEach(option => {
                option.classList.remove('selected');
            });
            
            // 重置评分筛选
            document.querySelectorAll('#ratingFilter .rating-option').forEach(option => {
                option.classList.remove('selected');
                option.querySelector('.rating-check').style.color = 'transparent';
            });
            
            // 重置更多筛选
            document.querySelectorAll('#moreFilter .filter-checkbox').forEach(checkbox => {
                checkbox.checked = false;
            });
            document.querySelectorAll('#moreFilter .category-option').forEach(option => {
                option.classList.remove('selected');
            });
            document.querySelector('#moreFilter .category-option:first-child').classList.add('selected');
            
            // 重置排序筛选
            document.querySelectorAll('#sortFilter .filter-checkbox').forEach(checkbox => {
                checkbox.checked = false;
            });
            document.querySelector('#sortFilter .filter-checkbox:first-child').checked = true;
        }
        
        // 更新筛选结果（模拟）
        function updateFilterResults() {
            const tagCount = document.querySelectorAll('.active-filter-tag').length;
            
            if (tagCount > 0) {
                document.querySelector('.filter-result').classList.add('show');
                document.querySelector('.clear-all').style.display = 'block';
                
                // 随机生成结果数量（模拟）
                const resultCount = Math.floor(Math.random() * 20) + 1;
                document.querySelector('.filter-result').textContent = 
                    `已为您找到 ${resultCount} 个符合条件的服务`;
                
                // 显示服务列表，隐藏空状态
                document.querySelector('.service-list').style.display = 'block';
                document.querySelector('.empty-state').classList.remove('show');
            } else {
                // 没有筛选条件时显示默认数量
                document.querySelector('.filter-result').textContent = '已为您找到 56 个服务';
            }
        }
        
        // 收藏按钮交互
        const favoriteButtons = document.querySelectorAll('.action-button .fa-heart');
        favoriteButtons.forEach(button => {
            button.addEventListener('click', (e) => {
                e.stopPropagation();
                const icon = button;
                icon.classList.toggle('far');
                icon.classList.toggle('fas');
                icon.classList.toggle('text-danger');
            });
        });
        
        // 空状态清除筛选按钮
        document.querySelector('.empty-button').addEventListener('click', () => {
            document.querySelectorAll('.active-filter-tag').forEach(tag => {
                tag.remove();
            });
            document.querySelector('.clear-all').style.display = 'none';
            document.querySelector('.filter-result').classList.remove('show');
            
            // 重置所有筛选条件
            resetAllFilters();
            
            // 显示服务列表，隐藏空状态
            document.querySelector('.service-list').style.display = 'block';
            document.querySelector('.empty-state').classList.remove('show');
        });
    </script>
</body>
</html>

